package com.ftg.learn.chapter03;

/**
 * 宠物信息
 *
 * @author lijiaxin
 * @version 1.0
 * @date 2023/5/13 14:07
 */


public enum PetEnum {

    pet1001(1001,"大花","橘猫"),
    pet1002(1002,"狗剩","金渐层");


    /**
     * 构造方法
     *      1.直接调用  new
     *      2.名称与类名一致
     *      3.没有返回值声明  void也不让写
     */
    private PetEnum(Integer id,String name,String type){
        this.id=id;
        this.name=name;
        this.type=type;

    }

    /**
     * 编号
     */
    private  Integer id;
    private  String name;
    private  String type;

    //开闭原则

    public Integer getId(){
        return this.id;
    }
    public String getName(){
        return this.name;
    }
    public String getType(){
        return this.type;
    }


}
